<!-- inc:global_head -->
<!-- inc:right.css -->
<!-- inc:right.head -->

<!-- 玩家管理 -->
<!-- if($sysAct == "add" || $sysAct == "modify") -->
<div class="table2" style="text-align:left;">
	<a href="admin.php?file=index">系统首页</a> &raquo;
	<a href="admin.php?file=gamewar&act=list">玩家战斗报告</a> &raquo;
	<!-- if($sysAct == "add") -->添加新战斗报告<!-- else -->编辑战斗报告<!-- end -->
	<input type="button" value="战斗报告列表" onclick="qgurl('admin.php?file=gamewar&act=list')">
</div>

<div class="table" onmouseover="this.className='table table1'" onmouseout="this.className='table'">
<table width="100%">
<form method="post" action="admin.php?file=gamewar&act=viewok&id={:$id}" onsubmit="return add_msg();">
<tr>
	<td class="left">战斗报告ID：<span style="color:red;">*</span></td>
	<td class="right"><input type="text" name="id" id="id" value="{:$rs[id]}">
	</td></tr></table></div>

<div class="table" onmouseover="this.className='table table1'" onmouseout="this.className='table'">
<table width="100%"><tr>
	<td class="left">战斗报告名称：<span style="color:red;">*</span></td>
	<td class="right"><input type="text" name="task_name" id="task_name" value="{:$rs[task_name]}">
</td></tr></table></div>

<div class="table" onmouseover="this.className='table table1'" onmouseout="this.className='table'">
<table width="100%"><tr>
	<td class="left">战斗报告说明：</td>
	<td class="right"><input type="text" name="task_con" id="task_con" value="{:$rs[task_con]}">
<span class="clue_on">[修改无效]</span></td></tr></table></div>

<div class="table" onmouseover="this.className='table table1'" onmouseout="this.className='table'">
<table width="100%"><tr>
	<td class="left">建筑要求：</td>
	<td class="right"><input type="text" name="task_result" id="task_result" value="{:$rs[task_result]}">
<span class="clue_on">[修改无效]</span><td></tr></table></div>

<div class="table" onmouseover="this.className='table table1'" onmouseout="this.className='table'">
<table width="100%"><tr>
	<td class="left">资源要求：</td>
	<td class="right"><input type="text" name="task_ech" id="task_ech" value="{:$rs[task_ech]}">
<span class="clue_on">[修改无效]</span></td></tr></table></div>


<div class="table" onmouseover="this.className='table table1'" onmouseout="this.className='table'">
<table width="100%"><tr>
	<td class="left">所需黄金数目：</td>
	<td class="right"><input type="text" name="task_golds" id="task_golds" value="{:$rs[task_golds]}">
</td></tr></table></div>
<div class="table" onmouseover="this.className='table table1'" onmouseout="this.className='table'">
<table width="100%"><tr>
	<td class="left">所需食物数目：</td>
	<td class="right"><input type="text" name="task_rice" id="task_rice" value="{:$rs[task_rice]}">
</td></tr></table></div>

<div class="table" onmouseover="this.className='table table1'" onmouseout="this.className='table'">
<table width="100%"><tr>
	<td class="left">所需木材数目：</td>
	<td class="right"><input type="text" name="task_woods" id="task_woods" value="{:$rs[task_woods]}">
</td></tr></table></div>


<div class="table" onmouseover="this.className='table table1'" onmouseout="this.className='table'">
<table width="100%"><tr>
	<td class="left">所需矿石数目：</td>
	<td class="right"><input type="text" name="task_ores" id="task_ores" value="{:$rs[task_ores]}">
</td></tr></table></div>


<div class="table" onmouseover="this.className='table table1'" onmouseout="this.className='table'">
<table width="100%"><tr>
	<td class="left">所需玩家经验：</td>
	<td class="right"><input type="text" name="task_score" id="task_score" value="{:$rs[task_score]}">
</td></tr></table></div>


<div class="table" onmouseover="this.className='table table1'" onmouseout="this.className='table'">
<table width="100%"><tr>
	<td class="left">所需玩家等级：</td>
	<td class="right"><input type="text" name="user_grade" id="user_grade" value="{:$rs[user_grade]}">
</td></tr></table></div>







<!-- run:$button_msg = $sysAct == "modify" ? "编辑战斗报告" : "添加玩家";-->
<div class="table">
<table width="100%">
<tr>
	<td class="left"></td>
	<td class="right"><input type="submit" id="creat_button" class="mybutton_01" value="{:$button_msg}"> &nbsp; <span id="show_step" style="color:red;"></span></td>
</tr>
</form>
</table>
</div>
<script type="text/javascript">
function add_msg(msg)
{
	var username = $("username").value;
	if(!username)
	{
		alert("账号不允许为空");
		return false;
	}

	$("show_step").innerHTML = "<img src='images/loading.gif' border='0' align='absmiddle'> 正在保存数据，如果网页没有动静请刷新...";

	$("creat_button").disabled = true;
}
</script>

<!-- elseif($sysAct == "list") -->
<div class="table2" style="text-align:left;">
	<a href="admin.php?file=index">系统首页</a> &raquo;
	玩家战斗报告
	<input type="button" value="添加新战斗报告" onclick="qgurl('admin.php?file=gamewar&act=add')">
</div>

<div class="table">
	<table cellpadding="1" cellspacing="0">
	<form method="post" action="admin.php?file=gamewar&act=list">
	<tr>
		<td><input type="text" name="keywords" id="keywords" value="{:$keywords}"></td>
		<td>
			<select name="stype" id="stype">
			<option value="nickname"{if($stype == "nickname")} selected{end}>报告玩家</option>
			<option value="dates"{if($stype == "dates")} selected{end}>时间</option>
			</select>
		</td>
		<td>
			<input type="submit" value="搜索" class="mybutton_01">
		</td>
			<td>
			<input type="button" value="删除所有" class="mybutton_01" onclick="qg_deleteall()">
		</td>
		</form>
	</tr>
	</table>
</div>

<table width="100%" cellpadding="0" cellspacing="0">
<tr>
	<td style="border-bottom:1px #D4D4D4 solid;"><img src="images/blank.gif" border="0" width="1" height="1"></td>
</tr>
</table>

<table width="100%" cellpadding="0" cellspacing="0">
<tr class="table table2">
	<td height="23px" class="msg_subject_id b_b">战斗报告ID</td>
	<td align="center" class="msg_subject b_b">报告玩家</td>
	<td align="center" class="msg_subject b_b">战斗角色</td>
	<td align="center" class="msg_subject b_b">武将</td>
	<td align="center" class="msg_subject b_b">士兵(数量)</td>
	<td align="center" class="msg_subject b_b">攻击点</td>
	<td align="center" class="msg_subject b_b">防御点</td>
	<td align="center" class="msg_subject b_b">损失（数量）</td>
	<td align="center" class="msg_subject b_b">得到资源</td>
	<td align="center" class="msg_subject b_b">结果</td>
	<td align="center" class="msg_subject b_b">时间</td>
	<td align="center" class="msg_postdate b_b">操作</td>
</tr>
<!-- $rslist AS $key=>$valuea-->
<tr class="m_out" onmouseover="this.className='m_over'" onmouseout="this.className='m_out'">
	<td height="25px" align="center" class="b_b">{:$valuea[id]}</td>
	<td align="center" class="b_b">{:$valuea[nickname]}</td>
	<td align="center" class="b_b"><!-- if($valuea[w_type] =="0") -->防御方<!-- elseif($valuea[w_type] =="1")-->攻击方<!-- end --></td>
	<td align="center" class="b_b">{:$valuea[gen_name]}</td>
	<td align="center" class="b_b">{:$valuea[army_info]}</td>
	<td align="center" class="b_b">{:$valuea[attack_power]}</td>
	<td align="center" class="b_b">{:$valuea[recovery_power]}</td>
	<td align="center" class="b_b">{:$valuea[loss_army]}</td>
	<td align="center" class="b_b"><!-- if($valuea[get_resource] =="") -->无<!-- else-->{:$valuea[get_resource]}<!-- end --></td>
	<td align="center" class="b_b"><!-- if($valuea[war_status] =="0") -->失败<!-- elseif($valuea[war_status] =="1")-->胜利<!-- elseif($valuea[war_status] =="2")-->平局<!-- end --></td>
	<td align="center" class="b_b">{run:echo date('Y-m-j',$valuea[dates]);}</td>
	<td align="center" class="b_b">
		<input type="button" value="编辑" class="mybutton_01" onclick="qg_modify({:$valuea[id]})">
		<input type="button" value="删除" class="mybutton_01" onclick="qg_delete({:$valuea[id]})">
	</td>
</tr>
<!-- end -->
</table>
<div align="right">{:$pagelist}</div>
<script type="text/javascript">
function qg_modify(id)
{
	window.location.href="admin.php?file=gamewar&act=modify&id="+id;
}
function qg_delete(id)
{
	//判断是否删除
	question = confirm("确认删除该信息吗？特别说明，删除后无法恢复！");
	if (question != "0")
	{
		qgurl("admin.php?file=gamewar&act=delete&id="+id);
	}
}
function qg_deleteall()
{
	//判断是否删除
	question = confirm("确认删除该信息吗？特别说明，删除后无法恢复！");
	if (question != "0")
	{
		qgurl("admin.php?file=gamewar&act=deleteall");
	}
}
</script>
<!-- end -->